package com.iaz.tech.tools.common.flow.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 基础数学公式
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class Formula extends FlowNode{
	/**
     * 日志
     */
	private final static Logger logger = (Logger) LoggerFactory.getLogger(Formula.class);
    /* 表达式 */
	private String expressions = "";

	/**
     * 执行流程
     */
    @Override
    public Object executeFlow(Object property) {
        Object result = null;
        try {
            if (this.expressions == null || this.expressions.isEmpty()) {
                logger.warn("Formula expressions is null or empty");
                return result;
            }
            /* 分词 */
            

        } catch (Exception e) {
            logger.error("Formula executeFlow error", e);
        }
        return result;
    }
    /**
     * 执行前处理
     */  
    @Override
    public Object beforeExecute(Object property) {
        Object result = null;
        return result;
    }
    /**
     * 执行后处理
     */
    @Override
    public Object afterExecute(Object property) {
        Object result = null;
        return result;
    }
}
